#include <iostream>
#include <iomanip>
#include <fstream>
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <numeric>
#include <vector>
#include <iterator>
#include <functional>
#include <boost/bind.hpp>
#include <boost/timer.hpp>
#include <boost/shared_ptr.hpp>

using namespace std;

int main(int argc, char** argv)
{
	if(argc == 1)
	{
		cout<<"cmd file"<<endl;
		exit(1);
	}

	ifstream in(argv[1]);
	string s;
	vector<string> V;
	
	while(in>>s)
		V.push_back(s);

	sort( V.begin(), V.end() );
	V.erase( unique( V.begin(), V.end() ), V.end() );
	cout<<V.size()<<endl;
//	copy(V.begin(),V.end(),ostream_iterator<string>(cout," "));
//	cout<<endl;

	return 0;
}
